import { GET_ADRESS_LIST } from '../types'
import http from '@/utils/http'

const state = {
	adressList: []
}

const getters = {
	adressList: state => {
		return state.adressList
	}
}

const actions = {
	getAdress ({commit}, params) {
		commit(GET_ADRESS_LIST, params)
	}
}

const mutations = {
	[GET_ADRESS_LIST] (state, params) {
		http.get('/api/adressList', params, false, res => {
			if (res.status == 1) {
				state.adressList = res.data
			}
		})
	}
} 

export default {
	state,
	getters,
 	mutations,
 	actions
}